// coding: utf-8
// @Author : lryself
// @Date : 2020/11/2 5:24
// @Software: GoLand

package main

func main() {
	
}
func intersection(nums1 []int, nums2 []int) []int {
	dict1 := make(map[int]bool)
	for _,i:=range nums1{
		dict1[i]=true
	}
	dict2 := make(map[int]bool)
	for _,i:=range nums2{
		dict2[i]=true
	}
	result:=[]int{}
	for key,_:=range dict1{
		if dict2[key]{
			result=append(result, key)
		}
	}
	return result
}